package org.easymis.portal.modules.main.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.easymis.commons.web.BaseController;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import io.swagger.annotations.ApiOperation;

@Controller
public class IndexController extends BaseController{
    @ApiOperation(value = "系統首頁",notes = "",produces = MediaType.TEXT_HTML_VALUE)
    @RequestMapping(value = { "/","/index.html" },method = { RequestMethod.GET, RequestMethod.POST })
    public String systemAuthinfo( ModelMap model){
    	return getTplPath(model, "index");
    }
    @ApiOperation(value = "系統首頁",notes = "",produces = MediaType.TEXT_HTML_VALUE)
    @RequestMapping(value = { "/login.html" },method = { RequestMethod.GET, RequestMethod.POST })
    public String login( ModelMap model){
    	return getTplPath(model, "login");
    }
    @ApiOperation(value = "购买",notes = "",produces = MediaType.TEXT_HTML_VALUE)
    @RequestMapping(value = { "/buy.html" },method = { RequestMethod.GET, RequestMethod.POST })
    public String buy( ModelMap model){
        return getTplPath(model,"buy");
    }
    @ApiOperation(value = "开发文档",notes = "",produces = MediaType.TEXT_HTML_VALUE)
    @RequestMapping(value = { "/docs.html" },method = { RequestMethod.GET, RequestMethod.POST })
    public String docs(HttpServletRequest request, HttpServletResponse response, ModelMap model, HttpSession session){
        return getTplPath(model,"docs");
    }
    @ApiOperation(value = "高端定制",notes = "",produces = MediaType.TEXT_HTML_VALUE)
    @RequestMapping(value = { "/product/customized.html" },method = { RequestMethod.GET, RequestMethod.POST })
    public String customized(HttpServletRequest request, HttpServletResponse response, ModelMap model, HttpSession session){
        return getTplPath(model,"product/customized");
    }
    @ApiOperation(value = "演示",notes = "",produces = MediaType.TEXT_HTML_VALUE)
    @RequestMapping(value = { "/demo.html" },method = { RequestMethod.GET, RequestMethod.POST })
    public String demo(HttpServletRequest request, HttpServletResponse response, ModelMap model, HttpSession session){
        return getTplPath(model,"demo");
    }
    @ApiOperation(value = "解决方案",notes = "",produces = MediaType.TEXT_HTML_VALUE)
    @RequestMapping(value = { "/solution/index.html" },method = { RequestMethod.GET, RequestMethod.POST })
    public String solution(HttpServletRequest request, HttpServletResponse response, ModelMap model, HttpSession session){
        return getTplPath(model,"/solution/index");
    }
    @ApiOperation(value = "客户案例",notes = "",produces = MediaType.TEXT_HTML_VALUE)
    @RequestMapping(value = { "/customer/index.html" },method = { RequestMethod.GET, RequestMethod.POST })
    public String customer(HttpServletRequest request, HttpServletResponse response, ModelMap model, HttpSession session){
        return getTplPath(model,"customer/index");
    }  
    @ApiOperation(value = "帮助",notes = "",produces = MediaType.TEXT_HTML_VALUE)
    @RequestMapping(value = { "/help.html" },method = { RequestMethod.GET, RequestMethod.POST })
    public String help(HttpServletRequest request, HttpServletResponse response, ModelMap model, HttpSession session){
        return getTplPath(model,"help");
    } 
}
